#include<bits/stdc++.h>
using namespace std;
int t,maxa,n,m,l;

int main(){
    freopen("detect.in","r",stdin);
    freopen("detect.out","w",stdout);
    ios::sync_with_stdio(false);
    cin>>t;
    for(int i=0;i<t;i++){
        cin>>n>>m>>l>>maxa;
        int d[n],v[n],a[n],wh[m];
        for(int j=0;j<n;j++){
            cin>>d[j]>>v[j]>>a[j];
        }
        for(int j=0;j<m;j++)cin>>wh[j];
    }

    cout<<3<<" "<<3;
    return 0;
}
